#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
	char str1[100];
	gets(str1);
	char str2[100];
	gets(str2);
	char str3[100];
	int k = 0;
	int i = 0;
	int count1 = 0;
	while (str1[i++] != '\0')
	{
		count1++;
	}
	int j = 0;
	int count2 = 0;
	while (str2[j++] != '\0')
	{
		count2++;
	}
	for (i = 0; i <= count1; i++)
	{
		for (j = 0; j < count2; j++)
		{
			if (str1[i] == str2[j])
			{
				i++;
				j = 0;
			}
		}
		str3[k] = str1[i];
		k++;
	}
	printf("%s\n", str3);
	return 0;
}